package com.fate.securecheckplatform.db;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.fate.securecheckplatform.bean.UserEntity;

import java.util.List;

@Dao
public interface UserDao {

    @Query("SELECT * from UserEntity")
    List<UserEntity> getUsers();

    @Query("DELETE FROM UserEntity")
    void deleteAllUsers();

    @Insert
    void addUsers(List<UserEntity> users);

    @Query("SELECT * from UserEntity where zh =:name")
    UserEntity getUserByAccount(String name);

}
